/*
 * Copyright 2020 HPB Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hpb.bc.mapper;

import com.hpb.bc.entity.TxInternalRecord;
import com.hpb.bc.example.TxInternalRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface TxInternalRecordMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tx_internal_record
     *
     * @mbg.generated
     */
    long countByExample(TxInternalRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tx_internal_record
     *
     * @mbg.generated
     */
    int deleteByExample(TxInternalRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tx_internal_record
     *
     * @mbg.generated
     */
    int insert(TxInternalRecord record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tx_internal_record
     *
     * @mbg.generated
     */
    int insertSelective(TxInternalRecord record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tx_internal_record
     *
     * @mbg.generated
     */
    List<TxInternalRecord> selectByExample(TxInternalRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tx_internal_record
     *
     * @mbg.generated
     */
    int updateByExampleSelective(@Param("record") TxInternalRecord record, @Param("example") TxInternalRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tx_internal_record
     *
     * @mbg.generated
     */
    int updateByExample(@Param("record") TxInternalRecord record, @Param("example") TxInternalRecordExample example);

    List<TxInternalRecord> selectTxInternalRecordListByBlockHash(@Param("blockHash") String blockHash);

    List<TxInternalRecord> selectTxInternalRecordListByBlockNumber(@Param("blockNumber") String blockNumber);

    List<TxInternalRecord> selectTxInternalRecordListByFromAddress(@Param("fromAddress") String contractAddress);

    List<TxInternalRecord> selectTxInternalRecordListByToAddress(@Param("toAddress") String contractAddress);

    List<TxInternalRecord> selectTxInternalRecordListByReferedAddress(@Param("referedAddress") String contractAddress);

    List<TxInternalRecord> selectTxInternalRecordListByTxHash(@Param("txHash") String txHash);

}